package com.li.springbootproject.config.i18n;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Locale;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.LocaleResolver;

/**
 * @author LiDong
 * @version 1.0.0
 * @createTime 2/21/2022 7:33 PM
 */
@Configuration
public class I18nLocaleResolver implements LocaleResolver {


    /**
     * 配置多语言的环境
     *
     * @param httpServletRequest httpServletRequest
     * @return Locale
     */
    @Override
    public Locale resolveLocale(HttpServletRequest httpServletRequest) {
        return Locale.CHINA;
    }

    @Override
    public void setLocale(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Locale locale) {

    }
}
